<div class="portlet">
    <div class="portlet-actions">
        <button class="btn blue btn-sm" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增</button>
    </div>
    <form class="portlet-search-body" name="queryForm">
        <input type="text" class="form-control search-item" ng-model="customerName" placeholder="客户名称">
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="grid.query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="grid.reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'customer/query.do', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'" style="text-align: ;"></th>
                <th data-options="field: 'customerName'" style="width: 10%;text-align: ;">客户名称</th>
                <th data-options="field: 'contactsName'" style="width: 10%;text-align: ;">联系人</th>
                <th data-options="field: 'contactsPhone'" style="width: 10%;text-align: ;">电话</th>
                <th data-options="field: 'address'" style="width: 20%;text-align: ;">地址</th>
                <th data-options="field: 'settlementType | code : settlement_type'" style="width: 20%;text-align: ;">结算方式</th>
                <th data-options="field: 'remark'" style="width: 20%;text-align: ;">备注</th>
                <th style="width: 15%;text-align: ;">操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="modal" data-options="title: '客户信息编辑', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
        	<div class="form-group">
				<label class="col-md-2 control-label">客户名称</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="customerName" ng-model="customer.customerName" required>
            	</div>
            	<label class="col-md-2 control-label">结算方式</label>
				<div class="col-md-4">
					<select class="form-control" ng-model="customer.settlementType" name="settlementType"
                            ng-options="opt.value as opt.name for opt in options.settlement_type" required></select>
            	</div>
            </div>
        	<div class="form-group">
        		<label class="col-md-2 control-label">联系人</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="contactsName" ng-model="customer.contactsName">
            	</div>
				<label class="col-md-2 control-label">电话</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="contactsPhone" ng-model="customer.contactsPhone">
            	</div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">地址</label>
				<div class="col-md-8">
					<textarea rows="1" class="form-control" name="address" ng-model="customer.address"></textarea>
            	</div>
            </div>
            <div class="form-group">
				<label class="col-md-2 control-label">备注</label>
				<div class="col-md-8">
					<textarea rows="3" class="form-control" name="remark" ng-model="customer.remark"></textarea>
            	</div>
            </div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="grid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" ng-click="grid.save();">
                <i class="fa fa-times"></i> 确定
            </button>
        </div>
    </form>
</div>
